package com.example.springcloud.service.impl;

import com.example.springcloud.entities.Payment;
import com.example.springcloud.mapper.PaymentMapper;
import com.example.springcloud.service.IPaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author weiHuang.zhu
 * @Date 9/4/2023 下午2:18
 */
@Service
public class PaymentServiceImpl implements IPaymentService {
    @Autowired
    private PaymentMapper paymentMapper;

    public int create(Payment payment) {
        return paymentMapper.insert(payment);
    }

    public Payment getPaymentById(Long id) {
        return paymentMapper.getPaymentById(id);
    }
}
